<html  lang="en" xmlns:th="http://www.thymeleaf.org">
<script src="http://cdn.bootcss.com/sockjs-client/1.1.1/sockjs.min.js"></script>
<script src="http://cdn.bootcss.com/stomp.js/2.3.3/stomp.js"></script>
<script type="text/javascript">
    var url = "http://localhost:8088/stompwebsocket";
    var socket = new SockJS('/stompwebsocket');
    var stompClient = Stomp.over(socket);
    stompClient.connect({}, function(frame) {
        stompClient.subscribe('/topic/strain/data/push', function(txt) {
            document.getElementById('message').innerHTML += txt+'<br/>';
        });
    });

    function send() {
        stompClient.send("/app/send.message", {}, "hello controllor");
    }
</script>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"/>
<title>应变实时数据推送地址</title>
<div id="container">
    <div id="message">

    </div>
    <div>
        <input id="text" type="text" placeholder="输入内容..."/>
        <button onclick="send()">发送消息</button>
    </div>
    <div id="message2">

    </div>
</div>
</html>